home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: vixen.cso.uiuc.edu!uchinews!not-for-mail
- From: magnus@darwin.uchicago.edu (Magnus Nordborg)
- Subject: template class as friend of instantiation class
- X-Nntp-Posting-Host: ntcs-ip8.uchicago.edu
- Content-Type: text/plain; charset=US-ASCII
- Message-ID: <960307221808.704AAFcQ.magnus@koa>
- Keywords: template, friend
- Sender: news@midway.uchicago.edu (News Administrator)
- Organization: University of Chicago -- Academic Computing Services
- X-Newsreader: Eloquent[2.01]; Eloquent is a Trademark of Take 3
- Mime-Version: 1.0 (Generated by Eloquent)
- Date: Fri, 8 Mar 1996 04:18:08 GMT
-
- How do I accomplish the following? I have a class, baseA, from which I
- derive
-
- class A : public baseA.
-
- I also have a template class, baseB, from which I derive
-
- class B : public baseB<A>,
-
- and B's members need access to the protected members of baseA. In other
- words, how does one declare a template class to be a "friend" of the class
- used in the template instantiation? Am I missing some obvious way, or is
- this obviously impossible?
-
- Please email replies, and I will summarize. Thanks in advance,
-
- -Magnus
- ---
- Magnus Nordborg
- Department of Ecology & Evolution
- The University of Chicago
- 1101 E. 57th St.
- Chicago, IL 60637-1573
- USA
- magnus@darwin.uchicago.edu (NeXT Mail, MIME)
- +1.312.702-1093 phone (lab)
- +1.312.667-5331 phone (home)
- +1.312.702-9740 fax
-